<template>
  <div class="bos war">
    <div class="area-center bold-size m-t-20">
      <div class="xi title-center">
        <div class="yuan">{{ $route.query.titleIndex }}</div>
        <div class="zhong">{{ $route.query.title }}</div>
      </div>
      <!-- 内容区域 -->
      <div class="bottom">
        <div class="small m-t-20" v-for="(item, index) in list" :key="index">
          <div class="title-center m-t-07">
            {{ item.coffeeproType }}
          </div>
          <div
            class="context m-t-07"
            @click="giftdetails(item, titleIndex, title)"
          >
            {{ item.coffeeproTitle }}
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { coffeeprolist } from "@/api/index";
export default {
  data() {
    return {
      list: "",
      title: this.$route.query.title,
      titleIndex: this.$route.query.titleIndex,
    };
  },
  created() {
    coffeeprolist({
      coffeeType: this.$route.query.id,
    }).then((res) => {
      if (res.data.code == 200) {
        this.list = res.data.data[0];
      }
    });
  },
  methods: {
    //
    giftdetails(item, titleIndex, title) {
      this.$router.push({
        path: "/wincoffee/tastingthree",
        query: {
          id: item.coffeeproId,
          titleIndex,
          title,
        },
      });
    },
  },
};
</script>

<style scoped>
.bos {
  min-height: 5.5rem;
}
.center {
  width: 98%;
}
.xi {
  width: 100%;
  margin-top: 0.05rem;
  display: flex;
}
.xi .yuan {
  width: 0.16rem;
  height: 0.16rem;

  text-align: center;
  line-height: 0.16rem;
  border-radius: 50%;
  margin-top: 0.05rem;
  border: 1px solid black;
}

/* 中间区域 */
.zhong {
  width: 95%;
  height: 100%;
  line-height: 0.3rem;
  padding-left: 0.05rem;
}
/* 内容区域 */
.bottom {
  width: 100%;
}
.small {
  width: 100%;
}
</style>